import request from '@/utils/request'

// 查询BOM主列表
export function listMaster(query) {
  return request({
    url: '/md/master/list',
    method: 'get',
    params: query
  })
}

// 查询BOM主详细
export function getMaster(serialNum) {
  return request({
    url: '/md/master/' + serialNum,
    method: 'get'
  })
}

// 新增BOM主
export function addMaster(data) {
  return request({
    url: '/md/master',
    method: 'post',
    data: data
  })
}

// 修改BOM主
export function updateMaster(data) {
  return request({
    url: '/md/master',
    method: 'put',
    data: data
  })
}

// 删除BOM主
export function delMaster(serialNum) {
  return request({
    url: '/md/master/' + serialNum,
    method: 'delete'
  })
}
// 同步
export function bomSync() {
  return request({
    url: '/md/master/sync',
    method: 'get'
  })
}
